Skip to content

Add WithMirrors option to append lifecycle - #1077

Merged
AlCutter merged 4 commits into
transparency-dev:mainfrom
AlCutter:mirror_mirror_op_tion_al
Jul 24, 2026
Merged

Add WithMirrors option to append lifecycle#1077
AlCutter merged 4 commits into
transparency-dev:mainfrom
AlCutter:mirror_mirror_op_tion_al

Conversation

@AlCutter

Copy link
Copy Markdown
Collaborator

This PR adds the ability to configure mirroring in the append lifecycle.

Since mirrors are witnesses with special powers, we use the same mechanism as WithWitnesses to describe the policy.

The implementation of the client/gateway code will come later.

Towards #945

@AlCutter
AlCutter requested a review from roger2hk July 24, 2026 11:10
@AlCutter
AlCutter requested a review from a team as a code owner July 24, 2026 11:10
@AlCutter
AlCutter force-pushed the mirror_mirror_op_tion_al branch from e8d487e to 1663c67 Compare July 24, 2026 11:42
Comment thread append_lifecycle.go Outdated
if err != nil {
return nil, err
eg := errgroup.Group{}
sigC := make(chan []byte, 2)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Using channel seems to be an overkill here. It can be replaced by:

var ws, ms []byte
...
...
...
cp = append(cp, ws...)
cp = append(cp, ms...)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, but meh :)
The assignments are a little more prone to future bugs (e.g. cut-n-paste assigning to the wrong var), but I don't feel very strongly about it.

Comment thread append_lifecycle.go Outdated
Comment on lines +988 to +995
// WithMirrors configures the set of tlog-mirror servers that Tessera will contact in order to obtain
// mirror counter-signatures on a checkpoint before publishing it.
//
// Requests will be sent to every mirror referenced by the group using the tlog-mirror API at the configured URL.
// The checkpoint will be accepted for publishing when a sufficient number of mirrors to satisfy the group
// have responded.
//
// If this method is not called, then no mirror counter signatures will be required to publish.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// WithMirrors configures the set of tlog-mirror servers that Tessera will contact in order to obtain
// mirror counter-signatures on a checkpoint before publishing it.
//
// Requests will be sent to every mirror referenced by the group using the tlog-mirror API at the configured URL.
// The checkpoint will be accepted for publishing when a sufficient number of mirrors to satisfy the group
// have responded.
//
// If this method is not called, then no mirror counter signatures will be required to publish.
// WithMirrors configures the set of tlog-mirror servers that Tessera will contact in order to obtain
// mirror countersignatures on a checkpoint before publishing it.
//
// Requests will be sent to every mirror referenced by the group using the tlog-mirror API at the configured URL.
// The checkpoint will be accepted for publishing when a sufficient number of mirrors to satisfy the group
// have responded.
//
// If this method is not called, then no mirror countersignatures will be required to publish.

Update to countersignatures for spelling consistency (counter signatures, counter-signatures).

@AlCutter
AlCutter force-pushed the mirror_mirror_op_tion_al branch from 68735fc to 677f008 Compare July 24, 2026 12:28
@AlCutter
AlCutter merged commit d0e58a3 into transparency-dev:main Jul 24, 2026
19 of 20 checks passed
@AlCutter
AlCutter deleted the mirror_mirror_op_tion_al branch July 24, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants